package com.example.book.dao.impl;

import com.example.book.dao.OrderDao;
import com.example.book.pojo.Order;

/**
 * @Description
 * @ClassName OrderDaoImpl
 * @Author 山山大魔王
 * @Date 2021/12/3 17:15
 * @Version 1.0
 */

public class OrderDaoImpl extends BaseDao implements OrderDao {
    @Override
    public int saveOrder(Order order) {

        System.out.println("OrderDaoImpl程序在["+Thread.currentThread().getName()+"]中");

        String sql = "insert into t_order(`order_id`,`create_time`,`price`,`status`,`user_id`) values(?,?,?,?,?)";

        return update(sql,order.getOrderId(),order.getCreateTime(),order.getPrice(),order.getStatus(),order.getUserId());

    }
}
